package adb;
import static adb.OSK.commandOSK;
import javax.swing.SwingWorker;

public class runCommandOnly extends SwingWorker<Void, String>{
@Override
    protected Void doInBackground() throws Exception {
                String[] cc = commandOSK.split(" ");
                ProcessBuilder pb = new ProcessBuilder(cc);
                Process process = pb.start();

//                BufferedReader inStreamReader = new BufferedReader(new InputStreamReader(process.getInputStream()));
//                String out="";
//                try {
//                String line = "";                
//                while ((line = inStreamReader.readLine()) != null) 
//                {if (line.length() > 0) {out = out + line + "\n";}} 
//                }catch (IOException ex) {System.out.printf(ex+"=ex\n");}
        return null;
    }
}

//public class runCommandOnly {
//
//    protected Void doInBackground() {
//                try {
//                    String[] cc = commandOSK.split(" ");
//                    ProcessBuilder pb = new ProcessBuilder(cc);
//                    Process process = pb.start();
//                    Thread.sleep(300);
////                    BufferedReader inStreamReader = new BufferedReader(new InputStreamReader(process.getInputStream()));
////                    String out="";
////                    try {
////                        String line = "";
////                        while ((line = inStreamReader.readLine()) != null)
////                        {if (line.length() > 0) {out = out + line + "\n";}}
////                    }catch (IOException ex) {System.out.printf(ex+"=ex\n");}
////                    return null;
//                }catch (IOException ex) {System.out.printf(ex+"=ex\n");} 
//                catch (InterruptedException ex) {System.out.printf(ex+"=ex\n");}
//        return null;
//}
//}
